package corej.course.net;

import java.io.*;
import java.net.Socket;

public class TCPStringClient {
    public static void main(String[] args) throws Exception {
        Socket s = new Socket("localhost", 9000);
        OutputStream os = s.getOutputStream();
        PrintWriter out = new PrintWriter(os);
        InputStream is = s.getInputStream();
        BufferedReader in = new BufferedReader(new InputStreamReader(is));

        out.println("hello tarena");
        out.flush();

        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());
        System.out.println(in.readLine());

        s.close();
    }

}
